package com.example.demo.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/*
 *
 *   @Author:max
 *   @Date: 2024/3/5-03-05-20:03
 *   用户通过用户名和密码登录
 *   lombok插件
 */
@Data
public class UserLoginByPassVO {

    @NotBlank(message = "参数不能留白、不能只由空格、Tab、换行符组成")
    @NotNull(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;


    @NotNull(message = "密码不能为空")
    @Length(min = 6,max = 11,message = "密码必须在6-11位")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$", message = "密码必须包含大小写字母和数字")
    @ApiModelProperty(value = "密码",required = true)
    private String password;

}
